//
//  CheckInPriceCellModel.m
//  EnvironmentalProtection
//
//  Created by HCreater on 2018/11/7.
//  Copyright © 2018年 HCreater. All rights reserved.
//

#import "CheckInPriceCellModel.h"

#import "IntegralData.h"

@interface CheckInPriceCellModel()

@property (nonatomic, copy) NSString* title;
@property (nonatomic, copy) NSString* time;
@property (nonatomic, copy) NSString* num;

@end

@implementation CheckInPriceCellModel

- (instancetype)initWithData:(id)data cellHeight:(CGFloat)cellHeight
{
    self = [super init];
    if (self)
    {
        _data = data;
        
        /// cellHeight+2（2容错）
        _cellHeight = MHUIScaleValue(cellHeight)+2;
        
        IntegralData* integralData = data;
        
        self.title = integralData.remark;
        self.time = integralData.addTime;
        NSString* strTag = [integralData.type isEqualToString:@"1"] ? @"+" : @"-";
        self.num = HCStrFormat(@"%@%@", strTag, integralData.integral);
    }
    
    return self;
}

@end
